<div class="form__wrapper">
  <div class="card pt-4">
    <div class="card-section">
      <div class="row column">
        <%= form.translated :text_field, :title, autofocus: true, aria: { label: :title } %>
      </div>

      <div class="row column">
        <%= form.number_field :weight %>
      </div>

      <div class="row column">
        <%= form.translated :text_field, :description, aria: { label: :description } %>
      </div>

      <div class="row column">
        <%= form.select :attachment_collection_id, @form.attachment_collections.map { |c| [translated_attribute(c.name), c.id] }, include_blank: true %>
      </div>

      <div class="p-6" data-file-or-link-tabs-controller>
        <%= cell "decidim/tab_panels", [
          {
            enabled: true,
            id: "file",
            text: "Upload file",
            icon: "file-upload-line",
            method: :cell,
            selected: form.object.file.present?,
            args: ["/decidim/attachments_file_tab", form]
          },
          {
            enabled: true,
            id: "link",
            text: "Link",
            icon: "link",
            method: :cell,
            selected: form.object.link.present?,
            args: ["/decidim/attachments_link_tab", form]
          }
        ] %>
      </div>
    </div>
  </div>
</div>
